package com.ruoyi.abuwx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.abuwx.mapper.AbuwxManagementActivitiesMapper;
import com.ruoyi.abuwx.domain.AbuwxManagementActivities;
import com.ruoyi.abuwx.service.IAbuwxManagementActivitiesService;

/**
 * 活动管理Service业务层处理
 * 
 * @author tang
 * @date 2022-07-02
 */
@Service
public class AbuwxManagementActivitiesServiceImpl implements IAbuwxManagementActivitiesService 
{
    @Autowired
    private AbuwxManagementActivitiesMapper abuwxManagementActivitiesMapper;

    /**
     * 查询活动管理
     * 
     * @param id 活动管理主键
     * @return 活动管理
     */
    @Override
    public AbuwxManagementActivities selectAbuwxManagementActivitiesById(Long id)
    {
        return abuwxManagementActivitiesMapper.selectAbuwxManagementActivitiesById(id);
    }

    /**
     * 查询活动管理列表
     * 
     * @param abuwxManagementActivities 活动管理
     * @return 活动管理
     */
    @Override
    public List<AbuwxManagementActivities> selectAbuwxManagementActivitiesList(AbuwxManagementActivities abuwxManagementActivities)
    {
        return abuwxManagementActivitiesMapper.selectAbuwxManagementActivitiesList(abuwxManagementActivities);
    }

    /**
     * 新增活动管理
     * 
     * @param abuwxManagementActivities 活动管理
     * @return 结果
     */
    @Override
    public int insertAbuwxManagementActivities(AbuwxManagementActivities abuwxManagementActivities)
    {
        abuwxManagementActivities.setCreateTime(DateUtils.getNowDate());
        return abuwxManagementActivitiesMapper.insertAbuwxManagementActivities(abuwxManagementActivities);
    }

    /**
     * 修改活动管理
     * 
     * @param abuwxManagementActivities 活动管理
     * @return 结果
     */
    @Override
    public int updateAbuwxManagementActivities(AbuwxManagementActivities abuwxManagementActivities)
    {
        abuwxManagementActivities.setUpdateTime(DateUtils.getNowDate());
        return abuwxManagementActivitiesMapper.updateAbuwxManagementActivities(abuwxManagementActivities);
    }

    /**
     * 批量删除活动管理
     * 
     * @param ids 需要删除的活动管理主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxManagementActivitiesByIds(Long[] ids)
    {
        return abuwxManagementActivitiesMapper.deleteAbuwxManagementActivitiesByIds(ids);
    }

    /**
     * 删除活动管理信息
     * 
     * @param id 活动管理主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxManagementActivitiesById(Long id)
    {
        return abuwxManagementActivitiesMapper.deleteAbuwxManagementActivitiesById(id);
    }
}
